CC=gcc
CC_OPTIONS=-Wall
FILES=main.c
CTAGS=ctags
CTAGS_OPTIONS=-R --c-kinds=+p --fields=+S --tag-relative=yes
DEBUG_OPTIONS=-DDEBUG_MODE -g
RELEASE_OPTIONS=-O3

debug_build:
#only if compliation is sucessful then generate the ctags
	${CC} ${CC_OPTIONS} ${DEBUG_OPTIONS} ${FILES} && ${CTAGS} ${CTAGS_OPTIONS}

release_build:
	${CC} ${CC_OPTIONS} ${RELEASE_OPTIONS} ${FILES} && ${CTAGS} ${CTAGS_OPTIONS}
